
$MM_NDSymmetryConversion[0] = 4;
$MM_NDSymmetryConversion[1] = 2;
$MM_NDSymmetryConversion[2] = 4;
$MM_NDSymmetryConversion[3] = 4;
$MM_NDSymmetryConversion[4] = 4;
$MM_NDSymmetryConversion[5] = 4;
function fxDtsBrickData::mm_computeSymmetry(%data) {
	%file = new FileObject();
	%file.openForRead(%data.brickFile);
	
	%size = %file.readLine();
	%type = %file.readLine();
	%isBrick = %type $= "BRICK";
	if(%isBrick) {
		if(%data.brickSizeX == %data.brickSizeY) {
			%sym = 1;
		} else {
			%sym = 2;
		}
	} else {
		%sym = 4;
	}
	
	%file.close();
	%file.delete();
	
	if(%sym == 4) {
		%sym2 = $MM_NDSymmetryConversion[ $ND::Symmetry[%data.getId()] ];
		if(%sym2 !$= "") %sym = %sym2;
	}
	
	return %sym;
}
function fxDtsBrickData::mm_getSymmetry(%data) {
	//if(%data.mm_symmetry !$= "") return %data.mm_symmetry;
	%sym = %data.mm_computeSymmetry();
	%data.mm_symmetry = %sym;
	return %sym;
}
function fxDtsBrickData::getUiName(%data) { return %data.uiName; }
function fxDtsBrickData::getBrickSize(%data) { return %data.brickSizeX SPC %data.brickSizeY SPC %data.brickSizeZ; }
